//
//  NoSceneView.m
//  YSSmartHome
//
//  Created by yanghao on 16/9/13.
//  Copyright © 2016年 yahaong. All rights reserved.
//

#import "NoSceneView.h"
#import "YHMarcros.h"

@implementation NoSceneView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setupUI];
    }
    return self;
}

- (void)addSceneBtnClick {
    if (self.addSceneClickBlock) {
        self.addSceneClickBlock();
    }
}
- (void)setupUI
{

    UIButton *addSceneBtn = [[UIButton alloc]init];
    [self addSubview:addSceneBtn];
    [addSceneBtn setImage:[UIImage imageNamed:@"scene_noscene_add" ] forState:UIControlStateNormal];
    [addSceneBtn addTarget:self action:@selector(addSceneBtnClick) forControlEvents:UIControlEventTouchUpInside];
    [addSceneBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(kIphoneSize_Height(80));
        make.centerX.equalTo(self);
        make.size.equalTo(CGSizeMake(kIphoneSize_Height(56), kIphoneSize_Height(56)));
    }];
    UILabel *tipsLabel = [[UILabel alloc]init];
    tipsLabel.text = @"   亲  你还未添加相关场景\n你可以点击“添加”进行设置";
     tipsLabel.font = [UIFont systemFontOfSize:14];
    tipsLabel.textColor =RGBColor(51, 51, 51);
    tipsLabel.numberOfLines = 2;
    [self addSubview:tipsLabel];
    [tipsLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(addSceneBtn.bottom).offset(20);
        make.centerX.equalTo(addSceneBtn);
    }];
}
@end
